﻿package Leophy.controls 
{
	import flash.display.MovieClip;
	import Leophy.text.MyTextField;
	
	/**
	* ...
	* @author Tophy,lion
	*/
	public class MyLabel extends MovieClip
	{
		public function get TXTWidth():Number {
			if (txt == null) {
				return 100;
			}else{
				return txt.width;
			}
		}
		
		[Inspectable(type="Number",defaultValue=100)]
		public function set TXTWidth(value:Number) {
			if (txt != null) {
				txt.width = value;
			}
		}
		
		
		public function get TXTHeight():Number {
			if (txt == null) {
				return 100;
			}else{
				return txt.height;
			}
		}
		[Inspectable(type="Number",defaultValue=15)]
		
		public function set TXTHeight(value:Number) {
			trace("?????")
			if (txt != null) {
				trace("???")
				txt.height = value;
			}
		}
		
		private var txt:MyTextField;
		public function MyLabel() 
		{
			configUI();
		}
		
		protected function configUI() {
			txt = new MyTextField();
			txt.width = TXTWidth;
			txt.height = TXTHeight;
			txt.border = true;
			this.addChild(txt);
		}
	}
	
}